home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-04-05 | 4.7 KB | 130 lines | [TEXT/PJMM] |
- { This file has been processed by The THINK Pascal Source Converter, v1.1. }
-
- {}
- {Created: Sunday, January 6, 1991 at 11:23 PM}
- { TextEdit.p}
- { Pascal Interface to the Macintosh Libraries}
- {}
- { Copyright Apple Computer, Inc. 1985-1990}
- { All rights reserved}
- {}
-
-
-
- { RMS 4/3/91 Modified to exclude declarations already in the THINK Pascal built-in interfaces }
-
-
-
- unit TextEdit;
- interface
- uses
- Types, Quickdraw;
-
-
- const
- { new names for the Justification styles }
- teFlushDefault = 0; {flush according to the line direction }
- teCenter = 1; {center justify }
- teFlushRight = -1; {flush right for all scripts }
- teFlushLeft = -2; {flush left for all scripts }
-
- { Set/Replace style modes }
- fontBit = 0; {set font}
- faceBit = 1; {set face}
- sizeBit = 2; {set size}
- clrBit = 3; {set color}
- addSizeBit = 4; {add size mode}
- toglBit = 5; {set faces in toggle mode}
-
- { offsets into TEDispatchRec }
- EOLHook = 0; {[ProcPtr] TEEOLHook}
- DRAWHook = 4; {[ProcPtr] TEWidthHook}
- WIDTHHook = 8; {[ProcPtr] TEDrawHook}
- HITTESTHook = 12; {[ProcPtr] TEHitTestHook}
- nWIDTHHook = 24; {[ProcPtr] nTEWidthHook}
- TextWidthHook = 28; {[ProcPtr] TETextWidthHook}
-
- { selectors for TECustomHook }
- intEOLHook = 0; {TEIntHook value}
- intDrawHook = 1; {TEIntHook value}
- intWidthHook = 2; {TEIntHook value}
- intHitTestHook = 3; {TEIntHook value}
- intNWidthHook = 6; {TEIntHook value for new version of WidthHook}
- intTextWidthHook = 7; {TEIntHook value for new TextWidthHook}
-
- { feature or bit definitions for TEFeatureFlag }
- teFAutoScr = 0; {00000001b}
- teFTextBuffering = 1; {00000010b}
- teFOutlineHilite = 2; {00000100b}
- teFInlineInput = 3; {00001000b}
- teFUseTextServices = 4; {00010000b}
-
- { action for the new "bit (un)set" interface, TEFeatureFlag }
- TEBitClear = 0;
- TEBitSet = 1; {set the selector bit}
- TEBitTest = -1; {no change; just return the current setting}
-
- {constants for identifying the routine that called FindWord }
- teWordSelect = 4; {clickExpand to select word}
- teWordDrag = 8; {clickExpand to drag new word}
- teFromFind = 12; {FindLine called it ($0C)}
- teFromRecal = 16; {RecalLines called it ($10)}
-
- type
- TextStylePtr = ^TextStyle;
- TextStyleHandle = ^TextStylePtr;
-
- TEIntHook = INTEGER;
-
- function TEGetPoint (offset: INTEGER; hTE: TEHandle): Point;
- inline
- $3F3C, $0008, $A83D;
- function TEStylNew (destRect: Rect; viewRect: Rect): TEHandle;
- inline
- $A83E;
- procedure SetStylHandle (theHandle: TEStyleHandle; hTE: TEHandle);
- inline
- $3F3C, $0005, $A83D;
- function GetStylHandle (hTE: TEHandle): TEStyleHandle;
- inline
- $3F3C, $0004, $A83D;
- procedure TEGetStyle (offset: INTEGER; var theStyle: TextStyle; var lineHeight: INTEGER; var fontAscent: INTEGER; hTE: TEHandle);
- inline
- $3F3C, $0003, $A83D;
- procedure TEStylPaste (hTE: TEHandle);
- inline
- $3F3C, $0000, $A83D;
- procedure TESetStyle (mode: INTEGER; newStyle: TextStyle; redraw: BOOLEAN; hTE: TEHandle);
- inline
- $3F3C, $0001, $A83D;
- procedure TEReplaceStyle (mode: INTEGER; oldStyle: TextStyle; newStyle: TextStyle; redraw: BOOLEAN; hTE: TEHandle);
- inline
- $3F3C, $0002, $A83D;
- function GetStylScrap (hTE: TEHandle): StScrpHandle;
- inline
- $3F3C, $0006, $A83D;
- procedure TEStylInsert (text: Ptr; length: LONGINT; hST: StScrpHandle; hTE: TEHandle);
- inline
- $3F3C, $0007, $A83D;
- function TEGetHeight (endLine: LONGINT; startLine: LONGINT; hTE: TEHandle): LONGINT;
- inline
- $3F3C, $0009, $A83D;
- function TEContinuousStyle (var mode: INTEGER; var aStyle: TextStyle; hTE: TEHandle): BOOLEAN;
- inline
- $3F3C, $000A, $A83D;
- procedure SetStylScrap (rangeStart: LONGINT; rangeEnd: LONGINT; newStyles: StScrpHandle; redraw: BOOLEAN; hTE: TEHandle);
- inline
- $3F3C, $000B, $A83D;
- procedure TECustomHook (which: TEIntHook; var addr: ProcPtr; hTE: TEHandle);
- inline
- $3F3C, $000C, $A83D;
- function TENumStyles (rangeStart: LONGINT; rangeEnd: LONGINT; hTE: TEHandle): LONGINT;
- inline
- $3F3C, $000D, $A83D;
- function TEFeatureFlag (feature: INTEGER; action: INTEGER; hTE: TEHandle): INTEGER;
- inline
- $3F3C, $000E, $A83D;
-
- implementation
- end.
-